﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using ResourceLoadBalancer.WebServices.Contracts.Data;
using System.Data.SqlClient;


namespace ResourceLoadBalancer.WebServices
{
    // NOTE: If you change the interface name "IResourceLoadBalancerService" here, you must also update the reference to "IResourceLoadBalancerService" in App.config.
    [ServiceContract]
    public interface IResourceLoadBalancerService
    {
        [OperationContract]
        void AddResource(ResourceDataContract resource);

        [OperationContract]
        void AddResources(IList<ResourceDataContract> resources);

        [OperationContract]
        ResourceURIDataContract AddResourceURI(ResourceURIDataContract resourceURI);

        [OperationContract]
        void AddResourceURIs(IList<ResourceURIDataContract> resourceURIs);

        [OperationContract]
        ResourceURIDataContract GetResourceURI(ResourceURIDataContract resourceURI);

        [OperationContract]
        IList<ResourceURIDataContract> GetResourceURIs(string uri);

        [OperationContract]
        void CleanResourceURIs(string hostName, string path);

        [OperationContract]
        void ConfigureQueuing(string hostName, string queueType, string queueName);

        [OperationContract]
        void DeconfigureQueuing(string hostName, string queueType, string queueName);

        [OperationContract]
        void QueueFileSystemResourceURI(ResourceURIDataContract resourceURI, ref SqlConnection connection, ref string hostName, ref string queueName);

        [OperationContract]
        void QueueFileSystemResourceURIs(string hostName, string queueName,IList<ResourceURIDataContract> resourceURIs);

        [OperationContract]
        string GetQueuedFileSystemResourceURI(string hostName, string queueName);

        [OperationContract]
        void QueueSharePointResourceURI(SharePointURIDataContract resourceURI);

        [OperationContract]
        SharePointURIDataContract GetQueuedSharePointResourceURI();

        [OperationContract]
        bool IsServiceAvailable();
        
    }
}
